﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DevExpress.Xpo;

namespace WROA.Models.Entitys
{
    public class Flow : XPObject
    {
        private Users user;
        [Association("FlowUser")]
        public Users User { get; set; }

        
        private FlowType flowtype;
        [Association("FlowFlowType")]
        public FlowType Flowtype { get; set; }

        
        private string fl_name;
        [DbType("nvarchar(50)")]
        public string Fl_name { get; set; }

        
        private string fl_remark;
        [DbType("ntext")]
        public string Fl_remark { get; set; }

        
        private DateTime fl_date;
        [DbType("datetime")]
        public DateTime Fl_date { get; set; }

        private FormData form; 
        public FormData Form { get; set; }

        private string fl_isban;
        [DbType("nvarchar(50)")]
        public string Fl_isban { get; set; }

        [Association("FlowProcedure", typeof(Procedure))]
        public XPCollection procedures
        {
            get
            {
                return GetCollection("procedures");
            }
        }

        [Association("ApplyDocumentFlow", typeof(ApplyDocument))]
        public XPCollection ApplyDocuments
        {
            get
            {
                return GetCollection("ApplyDocuments");
            }
        }

        [Association("ApplyMeetingFlow", typeof(ApplyMeeting))]
        public XPCollection applymeetings
        {
            get
            {
                return GetCollection("applymeetings");
            }
        }

        [Association("ApplyCarFlow", typeof(ApplyCar))]
        public XPCollection applycars
        {
            get
            {
                return GetCollection("applycars");
            }
        }
    }
}